home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / intrvews / xgrab.lha / xgrab / include / globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-06  |  2.8 KB  |  93 lines

  1. /**
  2.    GRAB Graph Layout and Browser System
  3.  
  4.    Copyright (c) 1986, 1988 Regents of the University of California
  5.    Copyright (c) 1989, Tera Computer Company
  6.  **/
  7.  
  8. /* globals.h - includes all global variables and some defines */
  9.  
  10. #ifndef globals_h
  11. #define globals_h
  12.  
  13. #include "screen.h"
  14. #include "digraph.h"
  15. #include "attribute.h"
  16.  
  17. SCREEN screen;        /* graph display info */
  18. SCREEN sizeToFitInfo;    /* info for sizeToFit command */
  19. DIGRAPH *digraph;    /* the digraph data structure */
  20. char *name;        /* graph file name */
  21.  
  22. float panGradient;    /* current pan gradient */
  23. float zoomGradient;    /* current zoom gradient */
  24. double aspratio;    /* aspect ratio for gremlin output */
  25. int currMode;        /* in browse, edit, or change mode */
  26. int stopInLayout;    /* stop in various phases of grapy layout */
  27.  
  28. float immedPercent;    /* percentage of BC from immed. pred/succ */
  29.  
  30. BOOL showbc;        /* showbc flag */
  31. BOOL graphChanged;    /* true if graph has been altered since last 
  32.                    written/read */
  33. BOOL ckpt_done;        /* true if graph has *not* been altered since last 
  34.                    checkpoint */
  35. BOOL Text_Flag;        /* true if enough room to draw text */
  36. BOOL changeOutEdges;    /* true if want to change out edges */
  37. BOOL changeInEdges;    /* true if want to change in edges */
  38. BOOL printNodeLabel;    /* print node labels regardless of whether they fit
  39.                or not */
  40. BOOL printEdgeLabel;    /* whether to print edge labels at all */
  41. BOOL markDummyNodes;    /* mark dummy nodes when displaying it */
  42. BOOL inChangeTextMode;    /* tells whether we are in change text mode */
  43. BOOL inChangeEdgeLabelMode;/* tells whether we are in midst of change label */
  44. BOOL inFocusNodeMode;   /* tells whether we are in midst of focussing on a 
  45.                node */
  46. BOOL printLayoutTime;   /* print time stats on graph layout */
  47. BOOL printArrow;    /* print arrow on edges? */
  48. BOOL landscapePSFile;    /* postscript file in landscape mode 
  49.                 (rotated 90 degrees)? */
  50. BOOL straightenEdges;    /* when trying to straighten edges, go all out? */
  51. BOOL ignoreHidden;    /* if a node/edge isn't `displayed', do predicates 
  52.                apply to it? */
  53.  
  54. BOOL debug;        /* overall debug flag */
  55. BOOL debug1;        /* debug flag for proper.c */
  56. BOOL debug2;        /* debug flag for mincross.c */
  57. BOOL debug3;        /* debug flag for layout.c */
  58.  
  59. BOOL read_graph();
  60.  
  61. #define MAX_HEURISTIC    20    
  62. BOOL heuristic[MAX_HEURISTIC];    /* heuristic flags */
  63.  
  64. #define    MIN_ABS_X_SIZE        4000
  65. #define MIN_ABS_Y_SIZE        4000
  66.  
  67. #define IN_EDIT_MODE        0
  68. #define    IN_BROWSE_MODE        1
  69. #define    IN_CHANGE_MODE        2
  70.  
  71. #define DONT_STOP        0
  72. #define STOP_AFTER_MAKEPROPER    1
  73. #define STOP_AFTER_MIN_CROSSING 2
  74.  
  75. #define BOLD            0
  76. #define UNBOLD            1
  77.  
  78. #define    DIVIDING_LINE_HEIGHT    8
  79. #define NAME_LINE_HEIGHT    1
  80. #define STATUS_LINE_HEIGHT    2
  81. #define MENU_LINE_HEIGHT    2.5
  82. #define INFO_LINES_HEIGHT    3.5
  83.  
  84. #define BORDER_SIZE        5
  85. #define ALRM_SEC        1
  86. #define ARROW_X_DIST_FACTOR    0.15
  87. #define ARROW_Y_DIST_FACTOR    0.07
  88.  
  89. #define MAXSTR            256
  90. #define MAXLINE            80
  91.  
  92. #endif
  93.